package demo2;

public class Test {

    public static void func(Message<?> message){
        System.out.println(message.getMessage());
    }

    public static void main(String[] args) {
        Message<String> stringMessage = new Message<>();
        stringMessage.setMessage("哈喽 117Java的小伙伴!!!");
        func(stringMessage);

        System.out.println("==============");

        Message<Integer> integerMessage = new Message<>();
        integerMessage.setMessage(1);
        func(integerMessage);
    }
}
